﻿@namespace BlazorComponent
@inherits BDomComponentBase

<div class="@CssProvider.GetClass(this)"
     style="@CssProvider.GetStyle(this)"
     id="@Id">
    <div class="@CssProvider.GetClass(this,"control")">
        <div class="@CssProvider.GetClass(this,"slot")" @onclick="Toggle">
            <div class="@CssProvider.GetClass(this,"input")">
                @if (Checked)
                {
                    @CheckedIconContent
                }
                else if (Indeterminate)
                {
                    @IndeterminateIconContent
                }
                else
                {
                    @UncheckIconContent
                }
                <input role="checkbox" type="checkbox" class="" disabled="@Disabled" id="check-@Id" />
                @AnimationContent
            </div>

            @if (ChildContent == null)
            {
                <label class="@CssProvider.GetClass(this,"label")">
                    @Label
                </label>
            }
            else
            {
                @ChildContent
            }
        </div>
    </div>
</div>